package com.cn.study0014.test006;

/**
 * @author lw
 * @ClassName StudentBiz.java
 * @Description
 * @createTime 2023年05月18日 15:49:00
 */
public class StudentBiz {
    Student[] student = new Student[30];
    public void addStudent(Student stu){
        for (int i = 0; i < student.length; i++) {
            if (student[i]==null){
                student[i]=stu;
                break;
            }
        }
    }
    public void showStudent(){
        for (int i = 0; i <student.length ; i++) {
            if (student[i]!=null){
                System.out.println(student[i].id+"\t"+student[i].name
                        +"\t"+student[i].age+"\t"+student[i].score);
            }
        }

    }
}
